<%@page isELIgnored="false" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>

<div>
 <tiles:insertDefinition name="admin.menus.blogs"/>
 <table cellspacing="0" cellpadding="0" class="table_list">
  <tbody>
  
  <tr>
    <td class="tab_header">ID</td>
    <td class="tab_header">Title</td>
    <td class="tab_header">Creator</td>    
    <td class="tab_header">Last Modified</td>
    <td class="tab_header">Actions</td>
  </tr>
    
	<c:forEach items="${blogs}" var="blog">
		
  	<tr>
  		<td><a href="/admin/blogs/view.do?id=${blog.id}">${blog.code}</a></td>
    	<td>${blog.title}</td>
    	<td>${blog.creatorDisplayName}</td>
    	<td>${blog.modified}</td>
    	<td>
    		<a href="/admin/blogs/activate.do?id=${blog.id}" title="Activate this Content"><img src="/img/approve.png" width="16" height="16" border="0"/></a>
    	</td>
   	</tr>
   	
   	</c:forEach>
	   	
</tbody></table>
</div>

<div class="admin_paging">
      <ul>
      <c:forEach begin="1" end="${pages}" step="1" var="num">
      	<c:choose>
      		<c:when test="${num == page}">
      			<li><a class="current" href="/admin/blogs/inactive.do?page=${num}">${num}</a></li>
      		</c:when>
      		<c:otherwise>
      			<li><a href="/admin/blogs/inactive.do?page=${num}">${num}</a></li>
      		</c:otherwise>
      	</c:choose>
      </c:forEach>
      <c:choose>
      	<c:when test="${page lt pages}">
        	<li><a class="next" href="/admin/blogs/inactive.do?page=${page + 1}">NEXT</a></li>
      	</c:when>
      	<c:otherwise>
      	</c:otherwise>
      </c:choose>
      </ul>
</div>